#include <stdlib.h>
#include <stdio.h>




typedef struct {
void (* funcA) (void * argv, int i);
void (* funcB) (void * argv, int i);
int a;
int b;
} my_number_type;

//  

void my_func1 (void * argv, int i);
void my_func2 (void * argv, int i);
void initialize_types(my_number_type * my_obj);


void my_func1 (void *argv, int i)
{
//  
  printf("burdayim \n");
}

void my_func2 (void *argv, int i)
{
 printf("ordayim \n");
}

void initialize_types(my_number_type * my_obj)
{
my_obj->a=10;
my_obj->b=4;
my_obj->funcA = my_func1; 
my_obj->funcB = my_func2;

}


int main(void)
{
int my_integer; 

my_number_type my_number;

my_number_type * temp_number_ptr = malloc(1*sizeof(my_number_type));
if (temp_number_ptr==NULL)
{
printf("error: failure for allocation \n");
}
else
{
printf("ok: success for allocation  \n");
}

initialize_types(temp_number_ptr );

//my_number.a=10;
//my_number.b=4;
//my_number.funcA = my_func1; 
//my_number.funcB = my_func2;

int x=0;
while(1)
{
//printf("%d\n",(my_number->a));
temp_number_ptr->a;
temp_number_ptr->funcA(0, my_number.a);
temp_number_ptr->funcB(0, my_number.b);

x++; 
if(x==10)
exit(1);
}


free(temp_number_ptr);
temp_number_ptr = NULL; 
}


